//
//  OSPostWordViewController.m
//  百思不得姐
//
//  Created by PushMeBaby on 16/3/8.
//  Copyright © 2016年 CoderC. All rights reserved.
//

#import "OSPostWordViewController.h"
#import "OSPlaceholderTextView.h"
@interface OSPostWordViewController ()

@property (nonatomic,strong)OSPlaceholderTextView *textView;

@end

@implementation OSPostWordViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    [self setupNav];
    
    [self setupTextView];
}

-(void)cancel{
    [self dismissViewControllerAnimated:YES completion:nil];
}
-(void)post{
    
}
-(void)setupTextView{
    OSPlaceholderTextView *textView = [[OSPlaceholderTextView alloc]init];
    textView.frame = self.view.bounds;

    textView.placeholder = @"把好玩的图片，好笑的段子或糗事发到这里，接受千万网友膜拜吧！发布违反国家法律内容的，我们将依法提交给有关部门处理。";
    [self.view addSubview:textView];
    self.textView = textView;
}
-(void)setupNav{
    self.title = @"发表文字";
    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc]initWithTitle:@"取消" style:UIBarButtonItemStyleDone target:self action:@selector(cancel)];
    self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc]initWithTitle:@"发表" style:UIBarButtonItemStyleDone target:self action:@selector(post)];
    self.navigationItem.rightBarButtonItem.enabled = NO;
    
    [self.navigationController.navigationBar layoutIfNeeded];
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
